package com.bitoon.basketdudes.dao;

import com.bitoon.basketdudes.web.jpa.PersistenceManager;
import javax.persistence.*;
import org.apache.log4j.Logger;


public class BaseJPADAO {

    protected EntityManagerFactory emfBasket = null;
    protected Logger log = Logger.getLogger(BaseJPADAO.class);
    private String catalogos[] = {"jpa_basket"};

    public BaseJPADAO() {

        try {
            // JPA Units
            emfBasket = PersistenceManager.getInstance().getEntityManagerFactory(catalogos[0]);
        } catch (Exception e) {
            log.error("[ERROR][constructor]: No se pudo conectar a la base de datos: " + e);
        }
        
    }


}
